import 'package:dio/dio.dart';
import 'package:get/get.dart';
import 'package:get/get_state_manager/src/simple/get_controllers.dart';
import '../../../../../bean/KeyValueBean.dart';
class EmployerPage_citySelect_Controller extends GetxController {
  RxList<KeyValueBean> list_gz = <KeyValueBean>[].obs;

  EmployerPage_citySelect_Controller() {
    initData();
  }

  void initData() {
    list_gz.add(KeyValueBean.keyValue(key: "北京", value: "联系不上", ui_select_view_data: 0));
    // list_gz.add(KeyValueBean("上海", "上海", 0));
    // list_gz.add(KeyValueBean("青岛", "青岛", 0));
    // list_gz.add(KeyValueBean("青岛", "青岛", 0));
    // list_gz.add(KeyValueBean("北京", "北京", 0));
    // list_gz.add(KeyValueBean("上海", "上海", 0));
    // list_gz.add(KeyValueBean("青岛", "青岛", 0));
    // list_gz.add(KeyValueBean("青岛", "青岛", 0));
  }

  void clearData() {
    list_gz.forEach((v) {
      v.ui_select_view_data = 0;
    });

    list_gz.refresh();
  }

  List<KeyValueBean> select() {
    Map<String, List<KeyValueBean>> map = {};
    List<KeyValueBean> selectedList1 =
        list_gz.where((v) => v.ui_select_view_data == 1).toList();

    return selectedList1;
  }
}
